<?php foreach ($messages["Messages"] as $message): ?>
    <div class="message_reply">
        <div id="photo_profile">
            <p><a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $message["User"]["id"] ?>" ><img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $message["Photo"]["filename"] ?>" alt=""/></a></p>
        </div>
        <div id="sender">
            <p><a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $message["User"]["id"] ?>" ><?php echo $message["User"]["name"]; ?></a></p>
        </div>
        <div id="content_msg">
            <p><?php echo $message["Message"]["content"]; ?>
            <?php if (($this->session->get("user_id") == $message["Message"]["author_user_id"]) || ($this->session->get("role_id") == 1)): ?>
                <a href="<?php echo BASE_PATH; ?>/messages/delete_replay/<?php echo $messages["Conversation"]["id"]; ?>/<?php echo $message["Message"]["id"] ?>/<?php echo $this->session->get("user_id") ?>" >(delete)</a></p>
        <?php endif ?>
            </div>
        </div>
        <div class="clear"></div>
<?php endforeach ?>